<?php



function getDepartamentos()
{
	$deps=array();
	$dbx=new MySQL();
	if($dbx->query("SELECT DEP_COD,DEP_NOM FROM departamento ORDER bY DEP_NOM ASC"))
	{
		while ($dbx->get())
		{
			$deps[]=array("DEP_COD"=>$dbx->field('DEP_COD'),"DEP_NOM"=>$dbx->field('DEP_NOM'));
		}
	}
	return $deps;
}
function getMunicipios($dep_cod)
{
	$muns=array();
	$dbx=new MySQL();
	if($dbx->query("SELECT MUN_COD,MUN_NOM FROM municipio WHERE MUN_DEP_COD=$dep_cod ORDER bY MUN_NOM ASC"))
	{
		while ($dbx->get())
		{
			$muns[]=array("MUN_COD"=>$dbx->field('MUN_COD'),"MUN_NOM"=>$dbx->field('MUN_NOM'));
		}
	}
	return $muns;
}




?>